{include file="index/header" /}
<body>
	<div class="panel admin-panel margin-top" id="add">
		<div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 增加内容</strong></div>
		<div class="body-content">
			<form method="post" class="form-x" action="{:url('type/typeedit')}"  enctype="multipart/form-data">    
				<div class="form-group">
					<div class="label">
						<label>名称：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="{$type_data.type_name}" name="type_name" data-validate="required:请输入标题" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>专业标题：</label>
					</div>
					<div class="field">
						<select name="nav_id" class="input w50" data-validate="required:请选择阶段">
							<option value="">请选择专业</option>
							{foreach name='nav_data' item='nav'}
							<option value="{$nav.nav_id}" <?php if($nav['nav_id'] == $type_data['nav_id']){echo 'selected';}?>>{$nav.nav_name}</option>
							{/foreach}
						</select>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>片头id</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" name="cast_id" value="{$type_data.cast_id}" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>是否免费：</label>
					</div>
					<div class="field">
						<div class="button-group radio">
							<label class="button {if $type_data.is_free eq 1} active {/if}">
								<span class="icon icon-check"></span>
								<input name="is_free" value="1" type="radio" {if $type_data.is_free eq 1}  checked="checked" {/if}>是
							</label>
							<label class="button {if $type_data.is_free eq 0} active {/if}">
								<span class="icon icon-times"></span>
								<input name="is_free" value="0"  type="radio" {if $type_data.is_free eq 0}  checked="checked" {/if}>否
							</label>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>是否在前台页面展示：</label>
					</div>
					<div class="field">
						<div class="button-group radio">
							<label class="button {if $type_data.is_show eq 1} active {/if}">
								<span class="icon icon-check"></span>
								<input name="is_show" value="1" type="radio" {if $type_data.is_show eq 1}  checked="checked" {/if}>是
							</label>
							<label class="button {if $type_data.is_show eq 0} active {/if}">
								<span class="icon icon-times"></span>
								<input name="is_show" value="0"  type="radio" {if $type_data.is_show eq 0}  checked="checked" {/if}>否
							</label>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>描述：</label>
					</div>
					<div class="field">
						<textarea class="input" name="type_desc" style="height:180px"  data-validate="required:请输入描述">{$type_data.type_desc}</textarea>
						<div class="tips">一句话介绍本分类</div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>排序：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" name="type_sort" value="{$type_data.type_sort ?: 0}"  data-validate="required:,number:排序必须为数字" />
						<div class="tips"></div>
					</div>
				</div>
				<input type="hidden" name="type_id" value="{$type_data.type_id}">
				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</body></html>